import request from "@/utils/request";
// 获取订单交易页信息
export const reqGetTradeInfo = () => {
  return request.get<any, any>("/order/auth/trade");
};

// 提交订单
export const reqSubmitOrder = ({ tradeNo, ...data }) => {
  return request({
    method: "POST",
    url: "/order/auth/submitOrder",
    params: { tradeNo },
    data,
  });
};
// 获取支付二维码
export const reqGetPayQRcode = (orderId: number) => {
  return request({
    url: `/payment/weixin/createNative/${orderId}`,
  });
};
// 查询订单支付状态
export const reqGetPayStatus = (orderId: number) => {
  return request({
    url: `/payment/weixin/queryPayStatus/${orderId}`,
  });
};
